#include <bits/stdc++.h>
using namespace std;
int read() {
	int x(0),f(0);
	char ch=getchar();
	while(!isdigit(ch)) f|=(ch=='-'),ch=getchar();
	while(isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	return f?-x:x;
}
int n=2000;
signed main() {
	freopen("tatooine.in","w",stdout);
	printf("%d\n",n);
	for(int i=2;i<=n;++i) printf("%d %d %d\n",i,i-1,rand()%20+1);
	return 0;
}
/*
*/

